/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.wimpi.modbus.util;

/**
 *
 * @author bekeband
 */
public class RTUTimer {
  long  startmillisec;
  long  endmillisec;
  long  maxtime;
  void RTUTimer() {ResetTimer();};
  void SetMaxTime(long mt) {maxtime = mt;};
  long GetMaxTime() {return maxtime;};  
  void StartTimer() {startmillisec = System.currentTimeMillis();};
  void EndTimer() {endmillisec = System.currentTimeMillis();};
  void ResetTimer() {startmillisec = 0; endmillisec = 0;};
  long GetEllapsedTime() {return endmillisec - startmillisec;};
  long GetCurrentTime() {return (System.currentTimeMillis() - startmillisec);};  
}
